home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / pcfig4th.arc / CASE.SCR < prev    next >
Text File  |  1985-04-23  |  2KB  |  1 lines

  1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                CASE...OF...ENDOF...ENDCASE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ( Dr. Eaker's CASE construct: FD 3:187 1982 )                   FORTH DEFINITIONS                                               (  CASE construct:  n CASE ... OF ... ENDOF ...ENDCASE )        : CASE    ?COMP CSP @ !CSP 4 ;                IMMEDIATE         : OF      4 ?PAIRS COMPILE (XOF) HERE 0 , 5 ; IMMEDIATE         : ENDOF   5 ?PAIRS COMPILE BRANCH HERE 0 ,                                SWAP 2 [COMPILE] THEN 4 ;           IMMEDIATE         : ENDCASE 4 ?PAIRS COMPILE DROP                                           BEGIN SP@ CSP @ = 0=                                            WHILE 2 [COMPILE] THEN                                          REPEAT CSP ! ;                      IMMEDIATE         ;S